//const core = new gameEngineCore();


core.registerBehaviourClass(Transform);
core.registerBehaviourClass(ImageRenderer);
core.registerBehaviourClass(Character);
core.registerBehaviourClass(Button);
core.registerBehaviourClass(HealthLineRenderer);
core.registerBehaviourClass(WordRenderer);

core.registerBehaviourClass(ChangableValueForPrefab);


declare var isEditorMode: boolean
function runningInEditorMode() {
    if (typeof isEditorMode !== 'undefined' && isEditorMode == true) {
        return true
    }
    else {
        return false;
    }
}


const CollisionDetectionSystem = new GameEngineCollisionDetectionSystem();

if (runningInEditorMode()) {
    core.registerSystem(new GameEngineRenderSystem());
    core.registerSystem(new EditorApiSystem());
}
else {
    core.registerSystem(new GameEnginePlayModeLifeCycleSystem());
    core.registerSystem(new GameEngineRenderSystem());
    core.registerSystem(new GameEngineMouseListenerSystem());
    core.registerSystem(CollisionDetectionSystem);
}



//core.start('./data/data.json');
setTimeout(() => {
    core.start(() => {
        core.changeScene("./data/scenes/beginScene.json");
    })
}, 1000)